import { IsNotEmpty, IsEmail } from 'class-validator'
import { Transform } from 'class-transformer'


export class UserDto {
  @IsNotEmpty({ message: '用户名不能为空'})
  @Transform(({ value }) => value.trim())
  name: string
  @IsNotEmpty({ message: 'email不能为空'})
  @IsEmail({}, { message: '请输入正确的邮箱地址'})
  email: string
}